package com.shujia.base;

import org.apache.log4j.Logger;

import java.io.BufferedReader;
import java.io.FileReader;
import java.text.SimpleDateFormat;
import java.util.Collections;
import java.util.Date;
import java.util.Random;

public class Logger2FlumeDemo {
    public static void main(String[] args) throws Exception{
        Logger logger = Logger.getLogger(Logger2FlumeDemo.class.getName());
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        BufferedReader br = new BufferedReader(new FileReader("flume/data/student.txt"));

        String line = null;
        while ((line = br.readLine()) != null){
            logger.info(line);

            Thread.sleep(10000);
        }


    }
}
